home *** CD-ROM | disk | FTP | other *** search
/ Micrografx ABC Graphics Suite / Micrografx ABC Graphics Suite - Disc 2.iso / abc.z / OLE_VDOC.CPP < prev    next >
C/C++ Source or Header  |  1995-09-15  |  2KB  |  93 lines

  1. // ole_vdoc.cpp : implementation of the COle_vbxDoc class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "ole_vbx.h"
  6.  
  7. #include "ole_vdoc.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // COle_vbxDoc
  16.  
  17. IMPLEMENT_DYNCREATE(COle_vbxDoc, CDocument)
  18.  
  19. BEGIN_MESSAGE_MAP(COle_vbxDoc, CDocument)
  20.     //{{AFX_MSG_MAP(COle_vbxDoc)
  21.         // NOTE - the ClassWizard will add and remove mapping macros here.
  22.         //    DO NOT EDIT what you see in these blocks of generated code!
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26. BEGIN_DISPATCH_MAP(COle_vbxDoc, CDocument)
  27.     //{{AFX_DISPATCH_MAP(COle_vbxDoc)
  28.         // NOTE - the ClassWizard will add and remove mapping macros here.
  29.         //      DO NOT EDIT what you see in these blocks of generated code!
  30.     //}}AFX_DISPATCH_MAP
  31. END_DISPATCH_MAP()
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // COle_vbxDoc construction/destruction
  35.  
  36. COle_vbxDoc::COle_vbxDoc()
  37. {
  38.     EnableAutomation();
  39.  
  40.     // TODO: add one-time construction code here
  41.  
  42.     AfxOleLockApp();
  43. }
  44.  
  45. COle_vbxDoc::~COle_vbxDoc()
  46. {
  47.     AfxOleUnlockApp();
  48. }
  49.  
  50. BOOL COle_vbxDoc::OnNewDocument()
  51. {
  52.     if (!CDocument::OnNewDocument())
  53.         return FALSE;
  54.  
  55.     // TODO: add reinitialization code here
  56.     // (SDI documents will reuse this document)
  57.  
  58.     return TRUE;
  59. }
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // COle_vbxDoc serialization
  63.  
  64. void COle_vbxDoc::Serialize(CArchive& ar)
  65. {
  66.     if (ar.IsStoring())
  67.     {
  68.         // TODO: add storing code here
  69.     }
  70.     else
  71.     {
  72.         // TODO: add loading code here
  73.     }
  74. }
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // COle_vbxDoc diagnostics
  78.  
  79. #ifdef _DEBUG
  80. void COle_vbxDoc::AssertValid() const
  81. {
  82.     CDocument::AssertValid();
  83. }
  84.  
  85. void COle_vbxDoc::Dump(CDumpContext& dc) const
  86. {
  87.     CDocument::Dump(dc);
  88. }
  89. #endif //_DEBUG
  90.  
  91. /////////////////////////////////////////////////////////////////////////////
  92. // COle_vbxDoc commands
  93.